package cn.yuanqiao.archive.liyong.mapper;

import cn.yuanqiao.archive.liyong.domain.TenantDownloadRecord;
import cn.yuanqiao.archive.liyong.domain.vo.DownloadRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zjj
 * @date 2023/9/12
 */
public interface TenantDownloadRecordMapper {

    int createDownloadRecord(@Param("tableName")String tableName);

    int insertTenantDownloadRecord(TenantDownloadRecord downloadRecord);

    int updateTenantDownloadRecord(TenantDownloadRecord downloadRecord);

    List<DownloadRecord> selectDownloadRecord(@Param("tenantCode")String tenantCode, @Param("userId")Long userId, @Param("col")String col, @Param("whereCol") String whereCol);

    List<String> getEFileTableName(@Param("tenantCode")String tenantCode, @Param("userId")Long userId);

    TenantDownloadRecord selectOneDownloadRecordById(TenantDownloadRecord downloadRecord);

    Integer candownload(@Param("tenantCode")String tenantCode, @Param("categoryId")Long categoryId, @Param("menuId")Long menuId, @Param("roleStr")String roleStr);

    Integer canBorrowdownload(@Param("tenantCode")String tenantCode, @Param("borrowId") Long borrowId);
}
